using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataReviewerTools._ResultManagement
{
    /// <summary>
    /// <para>Enable Data Reviewer</para>
    /// <para>Adds a feature dataset and tables necessary for an existing geodatabase to be considered a Reviewer workspace and store Data Reviewer results. The Reviewer workspace tables are required by ArcGIS Data Reviewer to manage Reviewer sessions.</para>
    /// <para>添加将现有地理数据库视为 Reviewer 工作空间所需的要素数据集和表，并存储 Data Reviewer 结果。ArcGIS Data Reviewer 需要 Reviewer 工作空间表来管理 Reviewer 会话。</para>
    /// </summary>    
    [DisplayName("Enable Data Reviewer")]
    public class EnableDataReviewer : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public EnableDataReviewer()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_workspace">
        /// <para>Workspace</para>
        /// <para>The geodatabase where the Data Reviewer tables and feature dataset will be created. This can be a desktop or enterprise geodatabase.</para>
        /// <para>将在其中创建 Data Reviewer 表和要素数据集的地理数据库。这可以是桌面地理数据库，也可以是企业级地理数据库。</para>
        /// </param>
        public EnableDataReviewer(object _workspace)
        {
            this._workspace = _workspace;
        }
        public override string ToolboxName => "Data Reviewer Tools";

        public override string ToolName => "Enable Data Reviewer";

        public override string CallName => "Reviewer.EnableDataReviewer";

        public override List<string> AcceptEnvironments => ["configKeyword", "workspace"];

        public override object[] ParameterInfo => [_workspace, _spatial_reference, _register_as_versioned.GetGPValue(), _config_keyword, _out_reviewer_workspace];

        /// <summary>
        /// <para>Workspace</para>
        /// <para>The geodatabase where the Data Reviewer tables and feature dataset will be created. This can be a desktop or enterprise geodatabase.</para>
        /// <para>将在其中创建 Data Reviewer 表和要素数据集的地理数据库。这可以是桌面地理数据库，也可以是企业级地理数据库。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _workspace { get; set; }


        /// <summary>
        /// <para>Coordinate System</para>
        /// <para>The geographic or projected coordinate system of the feature classes in the Reviewer workspace. The default is GCS_WGS_1984 if no value is specified.</para>
        /// <para>Reviewer 工作空间中要素类的地理坐标系或投影坐标系。如果未指定值，则默认值为 GCS_WGS_1984。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Coordinate System")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _spatial_reference { get; set; } = null;


        /// <summary>
        /// <para>Register as Versioned</para>
        /// <para><xdoc>
        ///   <para>Indicates whether the feature classes and tables added to the workspace will be registered as versioned. This only applies to enterprise databases.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The feature classes and tables will not be registered as versioned after they are added to the geodatabase. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The feature classes and tables will be registered as versioned after they are added to the geodatabase.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指示添加到工作空间的要素类和表是否将注册为版本。这仅适用于企业数据库。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 要素类和表添加到地理数据库后，不会注册为版本。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 要素类和表添加到地理数据库后，将注册为版本化。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Register as Versioned")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _register_as_versioned_value? _register_as_versioned { get; set; } = null;

        public enum _register_as_versioned_value
        {
            /// <summary>
            /// <para>NONVERSIONED</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NONVERSIONED")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>VERSIONED</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("VERSIONED")]
            [GPEnumValue("true")]
            _true,

        }

        /// <summary>
        /// <para>Configuration Keyword</para>
        /// <para>The configuration keyword that determines the storage parameters of the database tables. This applies to file and enterprise geodatabases. The DEFAULTS keyword is used by default.</para>
        /// <para>确定数据库表的存储参数的配置关键字。这适用于文件地理数据库和企业级地理数据库。默认情况下使用 DEFAULTS 关键字。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Configuration Keyword")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _config_keyword { get; set; } = null;


        /// <summary>
        /// <para>Output Reviewer Workspace</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Reviewer Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_reviewer_workspace { get; set; }


        public EnableDataReviewer SetEnv(object configKeyword = null, object workspace = null)
        {
            base.SetEnv(configKeyword: configKeyword, workspace: workspace);
            return this;
        }

    }

}